/*
 *                                                     __----~~~~~~~~~~~------___
 *                                    .  .   ~~//====......          __--~ ~~
 *                    -.            \_|//     |||\\  ~~~~~~::::... /~
 *                 ___-==_       _-~o~  \/    |||  \\            _/~~-
 *         __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *     _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *   .~       .~       |   \\ -_    /  /-   /   ||      \   /
 *  /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 *  |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *           '         ~-|      /|    |-~\~~       __--~~
 *                       |-~~-_/ |    |   ~\_   _-~            /\
 *                            /  \     \__   \/~                \__
 *                        _--~ _/ | .-~~____--~-/                  ~~==.
 *                       ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                  -_     ~\      ~~---l__i__i__i--~~_/
 *                                  _-~-__   ~)  \--______________--~~
 *                                //.-~~~-~_--~- |-------~~~~~~~~
 *                                       //.-~~~--\
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * 
 *                               神兽保佑            永无BUG
 */

/*
 * @Author: mylesshie@gmail.com
 * @Date: 2020-07-02 22:26:02
 * @LastEditors: mylesshie@gmail.com
 * @LastEditTime: 2020-09-10 21:57:05
 * @description: 
 */ 

import {
  GET_ACTIVITYS,
  GET_LIVE_LIST,
  DO_SEARCH,
  GET_LIFE_CONFIG
} from '@/constants/activity'
import createAction from '@/libs/createAction'

/**
 * @description: 获取赛事预告列表
 * @param {type} 
 */
export const getActivitys = (pageNum, pageSize) => createAction({
  type: GET_ACTIVITYS,
  url: '/ct/article/contest-notice/getLiveNotice',
  params: {
    queryParam: {
      pageNum,
      pageSize
    }
  }
})

/**
 * @description: 获取直播列表
 * @param {type} 
 */
export const getLiveList = (pageNum, pageSize) => createAction({
  type: GET_LIVE_LIST,
  url: '/ct/article/live-info/getLiveList',
  params: {
    pageNum,
    pageSize
  }
})

/**
 * @description: 搜索
 * @param {type} 
 */
export const doSearch = content => createAction({
  type: DO_SEARCH,
  url: `/ct/article/live-info/search?content=${content}`
})

/**
 * @description: 获取生活馆首页数据
 * @param {type} 
 */
export const getLifeConfig = () => createAction({
  type: GET_LIFE_CONFIG,
  url: '/ct/ct-config/getConfig'
})
